const uris = require("../static/data/uri.json");

let pathArray = [];
const uriArray = JSON.stringify(uris).split(":");

uriArray.forEach(path => {
	let comma = path.indexOf(",");
	let bracket = path.indexOf("}");
	if (bracket === -1 && comma === -1) {
		return;
	}
	if (bracket !== -1) {
		path = path.substring(0, bracket).replaceAll("\"", "").toString().trim();
	}
	if (comma !== -1) {
		path = path.substring(0, comma).replaceAll("\"", "").toString().trim();
	}
	pathArray.push(path);
});

module.exports = pathArray;
